# 引入 async_io 库
find_library(ASYNC_IO_LIB NAMES async_io)

# 检查 async_io 库是否找到
if (NOT ASYNC_IO_LIB)
    message(FATAL_ERROR "async_io library not found")
endif()

# 设置 async_io 的头文件路径
get_filename_component(ASYNC_IO_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" ABSOLUTE)

# 提供 async_io 库和头文件的信息
set(async_io_FOUND TRUE)
set(async_io_LIBRARIES ${ASYNC_IO_LIB})
set(async_io_INCLUDE_DIRS ${ASYNC_IO_INCLUDE_DIR})

# 在用户的环境变量中设置 async_io 的路径
mark_as_advanced(ASYNC_IO_LIBRARIES ASYNC_IO_INCLUDE_DIRS)

# 提供 async_io 的版本信息
set(async_io_VERSION @async_io_VERSION_MAJOR@.@async_io_VERSION_MINOR@.@async_io_VERSION_PATCH@)
